home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / pxfuname.z / pxfuname
Text File  |  1998-10-30  |  4KB  |  89 lines

  1. PXFUNAME(3F)                                           Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFUUNNAAMMEE - Retrieves the operating system name
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IINNTTEEGGEERR _j_u_n_a_m,, _i_e_r_r_o_r
  9.      CCAALLLL PPXXFFUUNNAAMMEE((_j_u_n_a_m,, _i_e_r_r_o_r))
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      7.2 F77 compiler.
  22.  
  23.      The PPXXFFUUNNAAMMEE routine uses the uunnaammee() system call to get the
  24.      components of the operating system name.
  25.  
  26.      The components of the uuttssnnaammee structure are:
  27.  
  28.      * sysname:  Name of the operating system
  29.  
  30.      * nodename:  Name of node in the operating system
  31.  
  32.      * release:  Current release level of the operating system
  33.  
  34.      * version:  Current version level of the release
  35.  
  36.      * machine:  Name of hardware type currently executing the program
  37.  
  38.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  39.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  40.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  41.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  42.      IRIX, the default kind is KKIINNDD==44.
  43.  
  44.      The following is a list of valid arguments for this routine:
  45.  
  46.      _j_u_n_a_m     An input integer variable or array element containing a
  47.                handle for a uuttssnnaammee structure.  This should have been
  48.                created by a call to the PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F) routine.
  49.  
  50.      _i_e_r_r_o_r    An output integer variable that contains zero if PPXXFFUUNNAAMMEE
  51.                returned the structure successfully or nonzero if PPXXFFUUNNAAMMEE
  52.                was unable to return the structure.
  53.  
  54. EEXXAAMMPPLLEESS
  55.           program test
  56.           integer junam, ierr, ilen
  57.           character*15 sname, nname, rel, vers, mach
  58.           call pxfstructcreate('utsname',junam,ierr)
  59.           call pxfuname(junam,ierr)
  60.           IF (ierr.ne.0) then
  61.              print *,'FAIL: error from pxfuname = ',ierr
  62.           else
  63.              print *,'PASS: No error from pxfuname = '
  64.           endif
  65.           ilen = 0
  66.           call pxfstrget(junam,'sysname',sname,ilen,ierr)
  67.           ilen = 0
  68.           call pxfstrget(junam,'nodename',nname,ilen,ierr)
  69.           ilen = 0
  70.           call pxfstrget(junam,'release',rel,ilen,ierr)
  71.           ilen = 0
  72.           call pxfstrget(junam,'version',vers,ilen,ierr)
  73.           ilen = 0
  74.           call pxfstrget(junam,'machine',mach,ilen,ierr)
  75.           print *, 'sysname=',sname
  76.           print *, 'nodename=',nname
  77.           print *, 'release=',rel
  78.           print *, 'version=',vers
  79.           print *, 'machine=',mach
  80.           call pxfstructfree(junam,ierr)
  81.  
  82. SSEEEE AALLSSOO
  83.      uunnaammee(2)
  84.      PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F)
  85.  
  86.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  87.      2165, for the printed version of this man page.
  88.  
  89.